<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/axios.min.js"></script>
    <script>
        function  getInfo(){
            axios.get("/test/getString").then(e => {
                alert(e.data);
            });
        }

        async function  getnum(){
            var num = 0;
            await  axios.get("/test/getX").then(e =>{
                num = e.data;
            });
            alert(num);

        }
    </script>
</head>
<body>
    <input type="button" value="得到" onclick="getInfo()"><br>
    <input type="button" value="得到x" onclick="getnum()">
</body>
</html>